package stc.skymobi.netty.handler.codec.http.request;

import io.netty.handler.codec.http.DefaultFullHttpRequest;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpVersion;

import java.util.UUID;

public class DefaultIdentifiableHttpRequest extends DefaultFullHttpRequest implements IdentifiableHttpRequest {

    private UUID uuid = UUID.randomUUID();

    /**
     * Creates a new instance.
     *
     * @param httpVersion the HTTP version of the request
     * @param method      the HTTP method of the request
     * @param uri         the URI or path of the request
     */
    public DefaultIdentifiableHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri) {
        super(httpVersion, method, uri);
    }

    @Override
    public UUID getIdentification() {
        return uuid;
    }

    public void setUuid(UUID uuid) {
        this.uuid = uuid;
    }
}
